/*
 * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package top.continew.admin.card.model.req;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import top.continew.starter.extension.crud.model.req.BaseReq;

import java.io.Serial;
import java.time.LocalDateTime;

/**
 * 创建或修改微信名片访问记录信息
 *
 * @author floyd
 * @since 2024/12/02 15:48
 */
@Data
@Schema(description = "创建或修改微信名片访问记录信息")
public class BusinessCardVisitorRecordReq extends BaseReq {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 微信名片ID
     */
    @Schema(description = "微信名片ID")
    private Long cardId;

    /**
     * 访问者ID（微信用户ID或匿名ID）
     */
    @Schema(description = "访问者ID（微信用户ID或匿名ID）")
    @Length(max = 100, message = "访问者ID（微信用户ID或匿名ID）长度不能超过 {max} 个字符")
    private String openId;

    /**
     * 访问时间
     */
    @Schema(description = "访问时间")
    private LocalDateTime visitorTime;

    /**
     * 停留时间（秒）
     */
    @Schema(description = "停留时间（秒）")
    private Integer duration;

    /**
     * 访问者IP地址
     */
    @Schema(description = "访问者IP地址")
    @Length(max = 50, message = "访问者IP地址长度不能超过 {max} 个字符")
    private String ipAddress;

    /**
     * 设备类型
     */
    @Schema(description = "设备类型")
    @Length(max = 50, message = "设备类型长度不能超过 {max} 个字符")
    private String deviceType;

    /**
     * 操作系统
     */
    @Schema(description = "操作系统")
    @Length(max = 50, message = "操作系统长度不能超过 {max} 个字符")
    private String operatingSystem;

    /**
     * 操作类型（如：click、scroll等）
     */
    @Schema(description = "操作类型（如：click、scroll等）")
    @Length(max = 16777215, message = "操作类型（如：click、scroll等）长度不能超过 {max} 个字符")
    private String actions;

    /**
     * 描述
     */
    @Schema(description = "描述")
    @Length(max = 200, message = "描述长度不能超过 {max} 个字符")
    private String description;
}